<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-modal-window"></i>设备管理</a></li>
        <li><a ui-sref="main.dm.DmMaintain.list" class="active" ng-bind="title"> </a></li>
    </ul>
</div>


<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>
<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!--<div class="panel-heading font-bold" style="height: 40px;line-height: 40px;">
                <a class="btn btn-sm btn-icon btn-rounded btn-default pull-right m-t-n-xs" ui-sref="main.dm.DmMaintain.list"><i class="text-md glyphicon glyphicon-chevron-up text-muted"></i></a>
            </div>-->
            <div class="table-responsive" style="padding: 15px 0 15px 0;">
            	<div class="formModel">
	            	<p style="padding: 0;margin: 0;text-align: center;font-weight: bold;">报障信息</p>
	                <table class="table table-striped b-t b-light text-center">
	                    <tbody class="tbody">
	                    <tr>
	                        <td class="v-middle">设备名称：</td>
	                        <td class="v-middle" ng-bind="pageInfo.deviceName"></td>
	                       	<td class="v-middle">状态：</td><!--待派单，待处理2，待确认3，已完成4-->
	                       	<td class="v-middle"style="color: #27c24c;">
	                       		<span ng-show="pageInfo.status=='2'">待处理</span>
	                       		<span ng-show="pageInfo.status=='3'">待确认</span>
	                       		<span ng-show="pageInfo.status=='4'">已完成</span>
	                       		<span ng-show="pageInfo.status=='1'">待派单</span>
	                       	</td>
	                    </tr>
	                    <tr>
	                        <td class="v-middle">房屋地址：</td>
	                        <td class="v-middle" ng-bind="pageInfo.address"></td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    <tr>
	                        <td class="v-middle">故障描述：</td>
	                        <td class="v-middle" ng-bind="pageInfo.description"></td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    <tr>
	                        <td class="v-middle">故障图片：</td>
	                        <td  class="v-middle">
	                            <img ng-repeat="pt in photos" ng-src="https://udacs.gmcciot.com:9527/app-api/android/download?mediaId={{pt.m_id}}" alt="" ng-mouseenter="scalImg(pt.m_id)" ng-mousemove="move()" ng-mouseleave="out()" />
	                       
	                        </td>
	                         <td></td>
	                        <td></td>
	                    </tr>
	                    <tr>
	                        <td class="v-middle">发起用户：</td>
	                       	<td class="v-middle" ng-bind="pageInfo.userName"></td>
	                       	<td class="v-middle">提单时间：</td>
	                       	<td class="v-middle" ng-bind="pageInfo.coverageTime"></td>
	                    </tr>
	                    </tbody>
	                </table>
            	</div>
            	<div ng-repeat="item in pageInfo.handle_record">
            	<div class="formModel" ng-show="item.logType=='0'">
            		<p style="padding: 0;margin: 0;text-align: center;font-weight: bold;">派单信息</p>
	                <table class="table table-striped b-t b-light text-center" >
	                    <tbody class="tbody">
	                    <tr>
	                        <td class="v-middle">派单人：</td>
	                        <td class="v-middle" ng-bind="item.handleUserName"></td>
	                        <td class="v-middle">派单时间：</td>
	                        <td class="v-middle" ng-bind="item.handleTime"></td>
	                    </tr>
	                    
	                    <tr>
	                        <td class="v-middle">维修组：</td>
	                        <td class="v-middle" ng-bind="item.maintainGroupCode"></td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    </tbody>
	                </table>
            	</div>
            	<div class="formModel" ng-show="item.logType=='1'">
            		<p style="padding: 0;margin: 0;text-align: center;font-weight: bold;">维护信息</p>
	                <table class="table table-striped b-t b-light text-center">
	                    <tbody class="tbody">
	                    <tr>
	                        <td class="v-middle">维修人员：</td>
	                        <td class="v-middle" ng-bind="item.handleUserName"></td>
	                        <td class="v-middle">维修时间：</td>
	                        <td class="v-middle" ng-bind="item.handleTime"></td>
	                    </tr>
	                    
	                    <tr>
	                        <td class="v-middle">处理方式：</td>
	                        <td class="v-middle" ng-bind="item.handleTypeName"></td>
	                        <td ng-show="item.handleType=='0'"></td>
	                        <td ng-show="item.handleType=='0'" ></td>
	                        <td ng-show="item.handleType=='1'">替换的设备编号：</td>
	                        <td ng-show="item.handleType=='1'" ng-bind="item.replaceSNNo"></td>
	                    </tr>
	                    <tr>
	                        <td class="v-middle">处理结果：</td>
	                        <td class="v-middle" ng-bind="item.handleResult"></td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    </tbody>
	                </table>
            	</div>
            	<div class="formModel" ng-show="item.logType=='2'">
            		<p style="padding: 0;margin: 0;text-align: center;font-weight: bold;">确认信息</p>
	                <table class="table table-striped b-t b-light text-center">
	                    <tbody class="tbody">
	                    <tr>
	                        <td class="v-middle">问题是否已解决：</td>
	                        <td class="v-middle" ng-bind="item.isSolve">
	                        	
	                        	<!--<input type="text" name="complete" value='1' ng-model="pageInfo.isSolve"/><span>是</span>
	                        	<input type="text" name="complete" value="0" ng-model="pageInfo.isSolve" style="margin-left: 30px;"/  ><span>否</span>-->
	                        </td>
	                       <td class="v-middle">确认时间：</td>
	                       <td class="v-middle">
	                       		<span ng-bind="item.handleTime"></span>
	                       </td>
	                    </tr>
	                   <tr>
	                   		<td class="v-middle">维修组：</td>
	                        <td class="v-middle"><span ng-bind="item.maintainGroupCode"></span></td>
	                        <td></td>
	                   		<td></td>
	                   </tr>
	                   
	                    <tr>
	                        <td class="v-middle">备注：</td>
	                        <td class="v-middle" ng-bind="item.handleResult">
	                        </td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    </tbody>
	                </table>
	               
            	</div>
            	</div>
            	<div class="formModel" ng-show="pageInfo.status=='3'">
            		<p style="padding: 0;margin: 0;text-align: center;font-weight: bold;">确认信息</p>
	                <table class="table table-striped b-t b-light text-center">
	                    <tbody class="tbody">
	                    <tr>
	                        <td class="v-middle">问题是否已解决：</td>
	                        <td class="v-middle">
	                        	<input type="radio" name="complete" value='1' ng-model="pageInfo.isSolve"/><span>是</span>
	                        	<input type="radio" name="complete" value="0" ng-model="pageInfo.isSolve" style="margin-left: 30px;"/  ><span>否</span>
	                        	<span ng-show="pageInfo.isSolve== 0 "style="margin-left: 30px;color: red;">请重新选择维修组！</span>
	                        </td>
	                       <td></td>
	                       <td></td>
	                    </tr>
	                   <tr ng-show="pageInfo.isSolve== 0 ">
	                   		<td class="v-middle">维修组：</td>
	                        <td class="v-middle"><span ng-bind="pageInfo.groupName"></span><span style="margin-left: 30px;color: #78A7FF;cursor: pointer;" ng-click="openGroup()">重新选择维修组</span></td>
	                        <td></td>
	                   		<td></td>
	                   </tr>
	                   
	                    <tr>
	                        <td class="v-middle">备注：</td>
	                        <td class="v-middle">
	                        	<textarea name="handleResult" ng-model="pageInfo.handleResult"></textarea>
	                        </td>
	                        <td></td>
	                        <td></td>
	                    </tr>
	                    </tbody>
	                </table>
	                <div style="text-align: center;margin-bottom: 30px;">
	                	<button class="btn btn-info w-xs m-l-xl addNew" style="margin-right:50px;" ng-click="confirm()">确认</button>
	                </div>
            	</div>
                <!-- 放大的图片 -->
                <img src="" alt="" id="bigerImg">
            </div>
        </div>
        
    </div>
   
</div>


<style scoped="scoped">
  
    .handleBtn{
        text-align: center;
        padding:10px 0;
    }
    .handleBtn button{
        padding:5px 15px;
        border:1px solid #78a7ff;
        color: #fff; 
        background-color: #78a7ff;
        margin-right: 15px;
        border-radius: 4px;
        font-size: 16px;
    }
    .handleBtn button:hover{
         background-color: #577dd0;
    }
    .formModel{
    	width: calc(100% - 30px);
    	margin: 0 auto;
    	padding: 0 2%;
    	border: 1px solid #b4b6b7;
    	margin-bottom: 15px;
    }
    .formModel table,.formModel table tr,.formModel table tr td{
    	background-color: #fff!important;
    	border: none!important;
    }
    .formModel table tr td{
        padding: 20px 0!important;
        width: 12%;
    }
    .formModel table tr td:nth-child(2){
    	width: 55%;
    }
    .formModel table tr td:nth-child(4){
    	width: 21%;
    }
    .formModel table tr td img {
        width: 80px;
        height: 80px;
        margin-right: 25px;

    }
    
    input[name="complete"]{
    	vertical-align: middle;
    	width: 18px;
    	height: 18px;
    	margin: 0 10px 0 0px;
    }
    
    textarea[name="marky"]{
    	width: 70%;
    	max-width: 70%;
    	font-size: 15px!important;
    	font-weight: normal;
    }
   
	input,label{
		vertical-align: middle;
		padding-bottom: 0!important;
		padding-top: 0!important;
	}
	.line-dashed{
		margin-top: 0!important;
	}
	.form-group{
		width: 50%;
		float: left;
	}
	textarea{
		font-size: 16px;
	}
</style>
